package com.tencreat.domain.account;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;


/**
 * 店铺对象 mall_store
 *
 * @author tencreat
 * @date 2021-11-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_store")
public class MallStore extends BaseEntity<MallStore> {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /**
     * 用户ID
     */
    @Excel(name = "用户ID",sort = 1)
    @ApiModelProperty(value = "用户ID")
    @TableField("`uuid`")
    private Long uuid;


    /**
     * 用户表的用户ID,创建人
     */

    @ApiModelProperty(value = "用户表的用户ID")
    @TableField("`user_id`")
    private Long userId;

    /**
     * 用户名称
     */
    @Excel(name = "店主名称",sort = 3)
    @ApiModelProperty(value = "店主名称")
    @TableField("`username`")
    private String username;


    @Excel(name = "店铺名称",sort = 3)
    @ApiModelProperty(value = "店铺名称")
    @TableField("`store_name`")
    private String storeName;

    /**
     * 描述信息  店铺头像
     * @Author yaoruiqi
     * @Date: 2023/10/09 06:17
     */

    @ApiModelProperty(value= "店铺头像")
    @TableField("`photo`")
    private String photo;


    /**
     * 描述信息  店铺分类
     * @Author yaoruiqi
     * @Date: 2023/10/09 06:19
     */
    @ApiModelProperty(value= "分类 0 美食 1 医疗")
    @TableField("`classify`")
    private String classify;


    /**
     * 描述信息  扫码供应价结算比例
     * @Author yaoruiqi
     * @Date: 2023/10/09 06:22
     */
    @ApiModelProperty(value= "扫码供应价结算比例")
    @TableField("`proportion`")
    private String proportion;


    /** 店铺评分， 1-5 */
    @Excel(name = "店铺评分， 1-5")
    @ApiModelProperty(value= "评分， 1-5")
    @TableField("`star`")
    private Integer star;

    /** 行政区域表的省ID */
    @ApiModelProperty(value= "行政区域表的省ID")
    @TableField("`province`")
    private Long province;

    /** 行政区域表的市ID */
    @ApiModelProperty(value= "行政区域表的市ID")
    @TableField("`city`")
    private Long city;

    /** 行政区域表的区县ID */
    @ApiModelProperty(value= "行政区域表的区县ID")
    @TableField("`county`")
    private Long county;

    /**
     * 账号
     */
    @ApiModelProperty(value = "账号")
    @TableField("`account`")
    private String account;

    /**
     * 用户手机号码
     */
    @Excel(name = "手机号码",sort = 2)
    @ApiModelProperty(value = "用户手机号码")
    @TableField("`mobile`")
    private String mobile;


    /**
     * 详细地址
     */
    @Excel(name = "详细地址",sort = 6)
    @ApiModelProperty(value = "详细地址")
    @TableField("`address`")
    private String address;


    /**
     * 身份证正面
     */
    @ApiModelProperty(value = "身份证正面")
    @TableField("`front_of_id_card`")
    private String frontOfIdCard;


    /**
     * 身份证背面
     */
    @ApiModelProperty(value = "身份证背面")
    @TableField("`back_of_id_card`")
    private String backOfIdCard;

    /**
     * 0 待审核, 1 审核成功, 2 审核驳回
     */
    @Excel(name = "审核状态",sort = 8,readConverterExp = "0=待审核,1=审核成功,2=审核驳回")
    @ApiModelProperty(value = "审核状态：0 待审核, 1 审核成功, 2 审核驳回")
    @TableField("`approval_status`")
    private Integer approvalStatus;

    /**
     * 0 可用, 1 禁用, 2 注销
     */
    @Excel(name = "店铺状态",sort = 7,readConverterExp = "0=正常,1=禁用,2=注销")
    @ApiModelProperty(value = "店铺状态：0 可用, 1 禁用, 2 注销")
    @TableField("`status`")
    private Integer status;


    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    /**
     * 省市区拼接
     */
    @Excel(name = "省市区",sort =5)
    @ApiModelProperty(value = "省市区拼接")
    @TableField(exist = false)
    private String areasName;

    @Excel(name = "申请时间",sort =9, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "申请时间")
    @TableField(exist = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applyTime;

    @ApiModelProperty(value = "营业执照")
    @TableField("`business_license`")
    private String businessLicense;

    @ApiModelProperty("申请时间开始")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime startTime;

    @ApiModelProperty("申请时间结束")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime endTime;

    @Excel(name = "货款",sort = 4)
    @ApiModelProperty("货款")
    @TableField(exist = false)
    private BigDecimal  supplierEarnings;

    @ApiModelProperty("排序字段")
    @TableField(exist = false)
    private String sortStr;

    @ApiModelProperty("排序规则")
    @TableField(exist = false)
    private String sortDesc;

    @ApiModelProperty("营业时间开始")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss")
    @TableField("`business_start_hours`")
    private LocalTime businessStartHours;

    @ApiModelProperty("营业时间结束")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss")
    @TableField("`business_end_hours`")
    private LocalTime businessEndHours;

/*
    */
/**
     * 描述信息
     * @Author yaoruiqi
     * @Date: 2023/10/16 02:16
     *//*

    @Excel(name = "商品销量")
    @ApiModelProperty(value = "商品销量")
    @TableField("`type`")
    private Long type;
*/


/*    @ApiModelProperty(value = "商家收款二维码")
    @TableField("`code`")
    private String code;*/

    @Excel(name = "商品销量")
    @ApiModelProperty(value = "商品销量")
    @TableField("`commodity_sales`")
    private Long commoditySales;

    @ApiModelProperty(value= "是否是推荐 0-否 1-是")
    @TableField("`hot`")
    private Integer isHot;

    @Excel(name = "商品所属类目ID")
    @ApiModelProperty(value= "商品所属类目ID")
    @TableField("`category_id`")
    private Long categoryId;


    @Excel(name = "店铺介绍")
    @ApiModelProperty(value= "店铺介绍")
    @TableField("`detail`")
    private String detail;


    @Excel(name = "店铺分类名字")
    @ApiModelProperty(value= "店铺分类名字")
    @TableField(exist = false)
    private String categoryName;


    /****
     * 省市区
     */
    @Excel(name = "省")
    @ApiModelProperty(value= "省")
    @TableField(exist = false)
    private String provinceName;

    @Excel(name = "市")
    @ApiModelProperty(value= "市")
    @TableField(exist = false)
    private String cityName;

    @Excel(name = "区")
    @ApiModelProperty(value= "区")
    @TableField(exist = false)
    private String countyName;


    @Excel(name = "分类父id")
    @ApiModelProperty(value= "分类父id")
    @TableField(value = "pid")
    private Long pid;



    @Excel(name = "经度")
    @ApiModelProperty(value= "经度")
    @TableField(value = "longitude")
    private String longitude;

    @Excel(name = "维度")
    @ApiModelProperty(value= "维度")
    @TableField(value = "dimensionality")
    private String dimensionality;


    @ApiModelProperty(value= "店铺资质")
    @TableField(value = "qualification")
    private String qualification;


    @Excel(name = "店铺待结算货款")
    @ApiModelProperty(value = "店铺待结算货款")
    @TableField("`store_finance_wait`")
    private BigDecimal storeFinanceWait;

    @Excel(name = "店铺货款")
    @ApiModelProperty(value = "店铺货款")
    @TableField("`store_finance`")
    private BigDecimal storeFinance;
}
